//
// Decompiled by Jadx - 415ms
//
package gc;

import android.text.TextUtils;
import android.view.View;
import com.google.gson.Gson;
import de.robv.android.xposed.XC_MethodHook;
import fi.e;
import fi.w;
import fn.j;
import fn.y;
import gc.bf;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.Objects;

public final class bg implements View.OnClickListener {
    public final int a;
    public final bf.e b;
    public final XC_MethodHook.MethodHookParam c;

    public bg(bf.e eVar, XC_MethodHook.MethodHookParam methodHookParam, int i) {
        this.a = i;
        this.b = eVar;
        this.c = methodHookParam;
    }

    /* JADX WARN: Removed duplicated region for block: B:24:0x00af A[SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:27:0x00b4 A[SYNTHETIC] */
    @Override
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void onClick(View view) {
        Boolean bool;
        String str;
        boolean z;
        int i = this.a;
        XC_MethodHook.MethodHookParam methodHookParam = this.c;
        bf.e eVar = this.b;
        switch (i) {
            case 0:
                eVar.a.getClass();
                if (TextUtils.isEmpty(bf.cq)) {
                    Object dq = z.dq();
                    Objects.requireNonNull(dq);
                    Class<?> cls = dq.getClass();
                    Object[] objArr = {Integer.TYPE.getName(), String.class.getName()};
                    Method[] declaredMethods = cls.getDeclaredMethods();
                    int length = declaredMethods.length;
                    int i2 = 0;
                    while (true) {
                        if (i2 < length) {
                            Method method = declaredMethods[i2];
                            if (method.getReturnType().getName().equals("void") && method.getParameterTypes().length == 2 && (method.getModifiers() & 4096) == 0 && Modifier.isPublic(method.getModifiers())) {
                                for (int i3 = 0; i3 < 2; i3++) {
                                    if (((objArr[i3] instanceof Class) && !method.getParameterTypes()[i3].getName().equals(((Class) objArr[i3]).getName())) || ((objArr[i3] instanceof String) && !method.getParameterTypes()[i3].getName().equals(objArr[i3]))) {
                                        z = false;
                                        if (!z) {
                                            str = method.getName();
                                        }
                                    }
                                }
                                z = true;
                                if (!z) {
                                }
                            }
                            i2++;
                        } else {
                            j.bi(new Object[]{cls, new Gson().toJson(objArr), "自适配失败Method"});
                            str = null;
                        }
                    }
                    bf.cq = str;
                }
                w wVar = new w(y.by.getActivity());
                wVar.aj = "清理聊天列表";
                wVar.bb();
                wVar.bj(fi.e.INPUT);
                wVar.ah = 2;
                wVar.k = String.valueOf(y.cd(10, "clearChat"));
                wVar.w = new aq(19);
                wVar.bk();
                bf.cr(methodHookParam.thisObject);
                return;
            default:
                eVar.getClass();
                if (y.ch("showAdminAge", false)) {
                    bool = Boolean.FALSE;
                } else {
                    bool = Boolean.TRUE;
                }
                y.co(bool, "showAdminAge");
                Object obj = methodHookParam.thisObject;
                eVar.a.getClass();
                bf.cr(obj);
                return;
        }
    }
}
